import { axios } from '@/utils/request'

//查
export function queryMenuList() {
  return axios({
    url: '/sysPermission/findPermission',
    method: 'get'
  })
}

//查2
export function queryMenuTree() {
  return axios({
    url: '/sysPermission/findTree',
    method: 'get'
  })
}

//查3
export function queryMenuTrees() {
  return axios({
    url: '/sysPermission/findTrees',
    method: 'get'
  })
}



//增
export function menuInsert(parameter) {
  return axios({
    url: '/sysPermission/insert',
    method: 'post',
    data: parameter
  })
}

//删
export function menuDelete(id) {
  return axios({
    url: '/sysPermission/delete/' + id,
    method: 'delete'
  })
}

//改
export function menuUpdate(parameter) {
  return axios({
    url: '/sysPermission/up/' + parameter.id,
    method: 'put',
    data: parameter
  })
}